import { defHttp } from "@/utils/http";

// ERP 投标药品类型 VO
export interface BidDrugTypeVO {
	id: number; // 主键
	name: string; // 名称
	sqNumb: string; // 序号
}

// ERP 投标药品类型 API
export const BidDrugTypeApi = {
	// 查询投标药品类型分页
	getBidDrugTypePage: async (params: any) => {
		return await defHttp.get({ url: `/whs/bidding/drug-type/page`, params });
	},

	// 查询投标药品类型详情
	getBidDrugType: async (id: number) => {
		return await defHttp.get({ url: `/whs/bidding/drug-type/get?id=` + id });
	},

	// 新增投标药品类型
	createBidDrugType: async (data: BidDrugTypeVO) => {
		return await defHttp.post({ url: `/whs/bidding/drug-type/create`, data });
	},

	// 修改投标药品类型
	updateBidDrugType: async (data: BidDrugTypeVO) => {
		return await defHttp.put({ url: `/whs/bidding/drug-type/update`, data });
	},

	// 删除投标药品类型
	deleteBidDrugType: async (id: number) => {
		return await defHttp.delete({
			url: `/whs/bidding/drug-type/delete?id=` + id
		});
	},

	// 导出投标药品类型 Excel
	exportBidDrugType: async (params: any) => {
		return await defHttp.download({ url: `/whs/bidding/drug-type/export-excel`, params });
	}
};
